package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ProductFallBack;
import cn.cs.fallback.ShopOrderFallBack;
import cn.cs.pojo.Product;
import cn.cs.pojo.ShopOrder;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-shop-provider", configuration = CsConfiguration.class, fallback = ShopOrderFallBack.class)
public interface ShopOrderClient {


    @RequestMapping(value = "/getShopOrderById", method = RequestMethod.POST)
    public ShopOrder getShopOrderById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getShopOrderByMap", method = RequestMethod.POST)
    public List<Map<String,Object>>	getShopOrderByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getShopOrderDetails", method = RequestMethod.POST)
    public List<Map<String,Object>>	getShopOrderDetails(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getShopOrderCountByMap", method = RequestMethod.POST)
    public Integer getShopOrderCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getShopOrderAgentByMap", method = RequestMethod.POST)
    public List<Map<String,Object>>	getShopOrderAgentByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getShopOrderCountAgentByMap", method = RequestMethod.POST)
    public Integer getShopOrderCountAgentByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/itriptxAddShopOrder", method = RequestMethod.POST)
    public Integer itriptxAddShopOrder(@RequestBody ShopOrder shopOrder)throws Exception;

    @RequestMapping(value = "/itriptxModifyShopOrder", method = RequestMethod.POST)
    public Integer itriptxModifyShopOrder(@RequestBody ShopOrder shopOrder)throws Exception;

    @RequestMapping(value = "/itriptxDeleteShopOrderById", method = RequestMethod.POST)
    public Integer itriptxDeleteShopOrderById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getShopIds", method = RequestMethod.POST)
    public List<String> getShopIds(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/insertShopOrder", method = RequestMethod.POST)
    public int insertShopOrder(@RequestBody ShopOrder order);
    @RequestMapping(value = "/updateCarProListState", method = RequestMethod.POST)
    public int updateCarProListState(@RequestBody Map<String, Object> paramMap);
    @RequestMapping(value = "/getCarProCun", method = RequestMethod.POST)
    public int getCarProCun(@RequestParam("carid")String carid);
    @RequestMapping(value = "/updateCarStateFin", method = RequestMethod.POST)
    public int updateCarStateFin(@RequestParam("carid")String carid);
    @RequestMapping(value = "/insertOrder_pro_rel", method = RequestMethod.POST)
    public int insertOrder_pro_rel(@RequestBody Map<String, Object> pro);


    @RequestMapping(value = "/getStateProByOutNum", method = RequestMethod.POST)
    int getStateProByOutNum(@RequestParam("shopOrdernum")String shopOrdernum);
    @RequestMapping(value = "/updateShopOrderState", method = RequestMethod.POST)
    int updateShopOrderState(@RequestBody Map<String, Object> param);
}

